<template lang="pug">
  Modal.lzw-modal-style-1(v-model="progressModal" fullscreen title="审批进度" width="800")
    Table.hasTitle-table.beautiful-table(:columns="thead" :data="progressData")
</template>

<script>
export default {
  props: {
    progressData: Array
  },
  data () {
    return {
      progressModal: false,
      thead: [
        {
          title: '发起人',
          minWidth: 100,
          align: 'center',
          key: 'createrName'
        },
        {
          title: '发送时间',
          minWidth: 100,
          align: 'center',
          render: (h, params) => {
            let row = params.row
            let times = row.createTime.slice(0, 19).replace(/T/g, ' ')
            return h('span', times)
          }
        },
        {
          title: '审批人',
          minWidth: 100,
          align: 'center',
          key: 'operatorName'
        },
        {
          title: '审批时间',
          minWidth: 100,
          align: 'center',
          render: (h, params) => {
            let row = params.row
            let times = ''
            if (row && row.operatTime) {
              times = row.operatTime.slice(0, 19).replace(/T/g, ' ')
            }
            return h('span', times)
          }
        },
        {
          title: '状态',
          minWidth: 100,
          align: 'center',
          key: 'status'
        },
        {
          title: '备注',
          minWidth: 100,
          align: 'center',
          key: 'remark'
        }
      ]
    }
  },
  methods: {
    openModal () {
      this.progressModal = true
    }
  }
}
</script>

<style>

</style>
